<template>
    <div>
        <el-drawer title="" :visible.sync="drawer" :direction="direction" :before-close="handleClose" custom-class="drawer-info">
            <div class="info-item">
                <h5 class="from-title">基本信息</h5>
                <div class="form-item">
                    <label class="form-item-label">用户名:</label>
                    <div class="form-item-content">{{ objInfo.userName }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">密码:</label>
                    <div class="form-item-content">{{ objInfo.password }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">手机号:</label>
                    <div class="form-item-content">{{ objInfo.phone }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">昵称:</label>
                    <div class="form-item-content">{{ objInfo.nickName }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">会员卡号:</label>
                    <div class="form-item-content">{{ objInfo.cardNumber }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">微信openid:</label>
                    <div class="form-item-content">{{ objInfo.openid }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">微信unionid:</label>
                    <div class="form-item-content">{{ objInfo.unionid }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">头像:</label>
                    <div class="form-item-content">{{ objInfo.avatar }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">性别:</label>
                    <div class="form-item-content">{{ objInfo.gender }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">生日:</label>
                    <div class="form-item-content">{{ objInfo.birthday }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">省:</label>
                    <div class="form-item-content">{{ objInfo.province }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">省名称:</label>
                    <div class="form-item-content">{{ objInfo.provinceName }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">市:</label>
                    <div class="form-item-content">{{ objInfo.city }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">市名称:</label>
                    <div class="form-item-content">{{ objInfo.cityName }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">区:</label>
                    <div class="form-item-content">{{ objInfo.area }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">区名称:</label>
                    <div class="form-item-content">{{ objInfo.areaName }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">会员来源:</label>
                    <div class="form-item-content">{{ objInfo.source }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">邀请人:</label>
                    <div class="form-item-content">{{ objInfo.invitation }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">会员等级id:</label>
                    <div class="form-item-content">{{ objInfo.levelId }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">会员状态(正常、禁用、黑名单):</label>
                    <div class="form-item-content">{{ objInfo.status }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">审核状态（是否实名）:</label>
                    <div class="form-item-content">{{ objInfo.auditStatus }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">认证类型:</label>
                    <div class="form-item-content">{{ objInfo.realType }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">备注:</label>
                    <div class="form-item-content">{{ objInfo.remark }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">创建人:</label>
                    <div class="form-item-content">{{ objInfo.createUserName }}</div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">创建时间:</label>
                    <div class="form-item-content">{{ objInfo.createTime }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">修改人:</label>
                    <div class="form-item-content">{{ objInfo.updateUser }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">修改时间:</label>
                    <div class="form-item-content">{{ objInfo.updateTime }}
                    </div>
                </div>
                <div class="form-item">
                    <label class="form-item-label">是否删除YesNoEnum:</label>
                    <div class="form-item-content">{{ objInfo.isDeleted }}
                    </div>
                </div>
            </div>
        </el-drawer>
    </div>
</template>
<script>
    import { memberInfo } from "@/api/member/member/member.js";
    
    export default {
        data() {
            return {
                drawer: true,
                direction: "rtl",
                objInfo: {},
            }
        },
        created() {
        },
        methods: {
            init(id) {
                if (id) {
                   memberInfo(id).then(res => {
                        this.objInfo = res.data
                   })

                }
                this.drawer = true
            },
            // 关闭抽屉
            handleClose(done) {
                done()
            },
        },
    }
</script>
<style scoped>
    .from-title {
        margin-bottom: 20px;
        padding: 0 20px 20px 20px;
        font-size: 16px;
        color: #17233d;
        border-bottom: 1px solid #eee;
    }
    .info-item {
        margin-bottom: 40px;
    }

    .form-item {
        margin-bottom: 20px;
        font-size: 14px;
    }
    .form-item-label {
        text-align: right;
        float: left;
        width: 25%;
    }
    .form-item-content {
        margin-left: 30%;
        width: 70%;
    }
</style>
